LINK	= ld
LINKFLAGS = 
CFLAGS	= -I../include

OBJS	= ../lib/*.o
CPCMD	= ../tools/pdisk ../c.img cp

ALL	= hello shell shm_test

all: $(ALL)

hello: hello.o $(OBJS)
	$(LINK) $(LINKFLAGS) -o $@ $^
	#$(CPCMD) $@ $@

shell: shell.o  $(OBJS)
	$(LINK) $(LINKFLAGS) -o $@ $^
	#$(CPCMD) $@ $@

shm_test: shm_test.o  $(OBJS)
	$(LINK) $(LINKFLAGS) -o $@ $^
	#$(CPCMD) $@ $@

install: $(ALL)
	$(CPCMD) hello hello
	$(CPCMD) shell shell
	$(CPCMD) shm_test shm_test

clean:
	rm -f *.o $(ALL)
